//创建盾牌兵
const {create} = require("./Create");
create(null,"盾牌兵",1,Game.spawns['BlackJun']);
create(null,"盾牌兵",2,Game.spawns['BlackJun']);//高级
create(null,"盾牌兵",3,Game.spawns['BlueJun']);//高自愈(硬抗150伤害)
//创建攻击兵
create(null,"战士",1,Game.spawns['GreyJun']);//带护盾
create(null,"战士",3,Game.spawns['GreyJun']);//狂战士
create(null,"战士",3,Game.spawns['BlackJun']);//狂战士
create(null,"占领兵",1,Game.spawns['WhiteJun2']);
//房间自用兵
create(null,"管家",1,Game.spawns['LemonJun']);
create(null,"护卫",1,Game.spawns['WhiteJun']);
create(null,"搬运兵",2,Game.spawns['WhiteJun']);
create(null,"建造兵",1,Game.spawns['OrangeJun']);
create(null,"维修兵",2,Game.spawns['BlueJun']);
create(null,"升级兵",2,Game.spawns['BlueJun']);
create(null,"升级兵",1,Game.spawns['GreyJun']);
create(null,"拆迁兵",4,Game.spawns['OrangeJun']);
create(null,"土匪",2,Game.spawns['OrangeJun']);
create(null,"收集兵",1,Game.spawns['BlackJun'],"资源id")
//搬家三件套
create(null,"占领兵",1,Game.spawns['GreyJun']);
create(null,"外矿收集兵", 3, Game.spawns['GreyJun'], "5bbcaa1c9099fc012e630d28", "W54N12");
create(null,"外矿收集兵", 3, Game.spawns['GreyJun'], "5bbcaa1c9099fc012e630d2a", "W54N12");
create(null,"外部维修兵", 4, Game.spawns['GreyJun'], 'W54N12');
create(null,"外部维修兵", 3, Game.spawns['GreyJun'], 'W54N12');
//外部兵种
create(null,"外矿收集兵", 1, Game.spawns['BlackJun'], "资源id", "资源房间名");
create(null,"外部维修兵", 2, Game.spawns['PinkJun'], 'W53N18');
create(null,"外部维修兵", 4, Game.spawns['WhiteJun'], 'W52N17');
create(null,"外矿收集兵", 2, Game.spawns['WhiteJun'], "5bbcaa399099fc012e631096", "W52N17");
create(null,"外矿收集兵", 2, Game.spawns['BlackJun'], "5bbcaa649099fc012e63142a", "W49N15");
create(null,"外矿收集兵", 1, Game.spawns['BlackJun'], "5bbcaa399099fc012e631096", "W52N17");
create(null,"预订兵", 2, Game.spawns['BlackJun'], "资源房间名");
Game.rooms["W53N16"].memory.upList=[]
//订单
//计算消耗数量
Game.market.calcTransactionCost(3000, "W53N16", "E38N39")
//获取能量消耗的买入单
Game.market.getAllOrders(order => order.resourceType === RESOURCE_ENERGY &&
    order.type === ORDER_SELL &&
    Game.market.calcTransactionCost(1000, "W53N16", order.roomName) < 500); // 更慢
//交易订单
Game.market.deal("65ba474a8dd24e0012e7bfa6",1000,"W53N16");
Game.market.deal("65ace786a7dd8000122997bd",2000,"W53N16");
Game.market.deal("65c1b0318dd24e001299a166",20,"W53N16");
Game.market.deal("65a5c3bc9fe542001274735d",10,"W53N16");
//通过id查看订单属性
Game.market.getOrderById("65ae8328c4cdf40012407789")
//查看存储的cpu数量
Game.cpu.bucket
Game.market.calcTransactionCost(2731, "W53N16", "W51N16")
//计算性能函数
let startCpu = Game.cpu.getUsed();
console.log('CPU used:', Game.cpu.getUsed() - startCpu);
console.log('CPU used:', Game.cpu.getUsed() - startCpu,"_",creep.name);


Game.rooms['W52N16'].memory.upList=[]

Game.rooms['W53N18'].terminal.send(RESOURCE_ENERGY, 100000, 'W52N17')
Game.rooms['W52N16'].terminal.send(RESOURCE_ENERGY, 30000, 'W53N16')